{% extends "base.html" %}
{% import "_macros.html" as macros %}
{% import "_my_wtf_macros.html" as my_wtf_macros %}

{% block title %}万屏时代OPC--待呼任务{% endblock %}

{% block panel_heading %}
  万屏时代OPC--待呼任务
  <div class="pull-right btn-group">
    <a href="{{ url_for('outbound_bp.reset_outbound') }}"
       class="btn btn-xs btn-success"
       onclick="return confirm('确定要重启外呼系统吗?')"
       style="margin-right: 5px" target="_self">
        重启外呼系统
    </a>
  </div>
{% endblock %}

{% block panel_body %}

    <table id="outbound-info-table" class="table table-bordered table-hover table-condensed table-striped">
        <thead>
            <tr>
                <th>用户ID</th>
                <th>外呼号码</th>
                <th>客户姓名</th>
                <th>外呼原因</th>
                <th>计划外呼时间</th>
            </tr>
        </thead>
        <tbody>
            {% for outbound in outbounds %}
            <tr>
                <td>
                    {% if outbound.owner %}
                        {{ outbound.owner.id }}
                    {% endif %}
                </td>
                <td>{{ outbound.mobile | encrypt }}</td>
                <td>
                    {% if outbound.owner %}
                        {{ outbound.owner.nickname }}
                    {% else %}
                        万屏汇新客户
                    {% endif %}
                </td>
                <td>{{ outbound.call_reason_display }}</td>
                <td>{{ outbound.schedule_time_display }}</td>
            </tr>
            {% endfor %}
        </tbody>
    </table>

{% endblock %}
